<template>
	<view :style="[$func.bg('bg.jpg')]" class="main_bg">
		<app-header title="文章详情"></app-header>

		<view class="title">
			{{info.title}}
		</view>
		<view class="content">
			<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					title: "",
					content: ""
				}

			}
		},
		onLoad(options) {
			this.getInfo(options.id)
		},
		methods: {
			getInfo(id) {
				this.$http.post("/data/api.data/newsView", { id: id }).then(res => {
					this.info = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.title {
		font-size: 36rpx;
		font-weight: bold;
		margin: 37rpx 31rpx;
	}

	.content {
		margin: 37rpx 31rpx;
		font-size: 30rpx;
		line-height: 60rpx;

		/deep/ img {
			max-width: 100%;
		}
	}
</style>